package carTest;

/**
 * @description:
 * @author: 张德长 dechang.zhang@ucarinc.com
 * @date: 11:32:35 2018/11/1
 * @version:2.0
 */
public class ResponPara {

    public String id;
    public String parentId;
    public String dataType;
    public String level;
    public String name;
    public int type;
    public String identifier;

    public String dataTypeChange(String dataType) {
        if(dataType==null){return dataType;}
        String[] splitStr = dataType.split(":");
        String first = splitStr[0];
        if ("List".equals(first)) {
            first = "Array";
        } else if ("Date".equals(first)) {
            first = "String";
        }
        if (splitStr.length == 2) {
            dataType = first + ":"+splitStr[1];
        }
        return dataType;
    }

    public void rpc2HttpPara() {
        this.dataType = dataTypeChange(this.dataType);
    }

}
